package com.ramos.kuaixiao.entity;

import android.text.TextUtils;

import org.json.JSONException;
import org.json.JSONObject;

import java.io.Serializable;

public class AddressInfo implements Serializable {
	public String aDName;
	public String city;
	public String descAddress;
	public double latitude;
	public double longitude;
	public String mainAddress;
	public String startTime;

	public String toString() {
		JSONObject localJSONObject = new JSONObject();
		try {
			localJSONObject.put("title", this.mainAddress);
			localJSONObject.put("lng", this.longitude);
			localJSONObject.put("lat", this.latitude);
			localJSONObject.put("address", this.descAddress);
			localJSONObject.put("start_time", this.startTime);
			localJSONObject.put("city_code", this.city);
			if (!TextUtils.isEmpty(this.aDName)) {
				localJSONObject.put("ad_name", this.aDName);
			}
			if (localJSONObject.toString().length() <= 2) {
				return "";
			}
		} catch (JSONException localJSONException) {
			localJSONException.printStackTrace();
		}
		return localJSONObject.toString();
	}
}